package com.greydawn.StatePattern;

/**
 * @Author: zhongwr
 * @Create: 2021/12/18 15:50
 * @Version 1.0
 * @Description:
 */
public class StatusB implements Status {

    private String statusStr = "B";

    public String getStatusStr() {
        return statusStr;
    }

    @Override
    public void doSomething(Context context) {
        //将Context的状态设为下一状态
        System.out.println("进入B状态，做一些B事情");
        context.status = new StatusC();
    }
}
